<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta charset="UTF-8">
    <title>{% block title %}

    {% endblock %}</title>

    <link rel="stylesheet" href="{{ url_for('static', filename='css/public.css') }}">
    <link rel="stylesheet" href="{{ url_for('static', filename='css/index.css') }}">
    <link rel="stylesheet" href="{{ url_for('static', filename='layui/css/layui.css') }}">
    <link rel="icon" href="{{ url_for('static', filename='images/icon.png') }}">
    <script src="{{ url_for('static', filename='layui/layui.js') }}"></script>


    {% block link %}

    {% endblock %}
</head>
<style type="text/css">
    .form_list {
        width: 1140px;
        margin: 0 auto auto 200px;
    }

    .el-dropdown-link {
        cursor: pointer;
        color: #409EFF;
    }

    .el-icon-arrow-down {
        font-size: 12px;
    }
</style>
{% block style %}

{% endblock %}
<body>

<div class="line-shadow"></div>
<div class="head">
    <div class="header" id="header">
        <div class="header_content">
            <div class="header_logo">
                <a href="/index">
                    <img src="{{ url_for('static', filename='images/logo.png') }}" alt="">
                </a>
            </div>
            <div class="header_menu" {% if not g.user.nickname %}
                 style="display: none" {% endif %}>
                <a href="javascript:;" class="layui-font" id="demo3">{{ g.user.nickname }} <i
                        class="layui-icon layui-font-12 layui-icon-down"></i></a>
            </div>
            {% if g.user.is_superuser %}
                <div class="header_menu">
                    <a class="index" href="/upload">上传</a>
                </div>
            {% endif %}
            <div class="header_menu">
                <a class="index" href="/index">首页</a>
            </div>

        </div>
    </div>
</div>

{% block body %}

{% endblock %}
<script>
    layui.use(['dropdown', 'util', 'layer', 'table'], function () {
        var dropdown = layui.dropdown
            , util = layui.util
            , layer = layui.layer
            , table = layui.table
            , $ = layui.jquery;
        dropdown.render({
            elem: '#demo3'
            , data: [{
                title: '退出',
                id: 101,
                url: '/logout'
            }]
            , click: function (obj) {
                window.location.href = obj.url
            }
        });
    })

</script>

</body>
{% block script %}

{% endblock %}

</html>